﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 进程启动
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 运行进程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process process = new System.Diagnostics.Process();
            process.StartInfo = new System.Diagnostics.ProcessStartInfo(AppDomain.CurrentDomain.BaseDirectory+ "需要启动的进程.exe");
            //工作目录
            process.StartInfo.WorkingDirectory = "c:/";
            process.Start();
        }

        private void button_Click_1(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process process = new System.Diagnostics.Process();
            process.StartInfo = new System.Diagnostics.ProcessStartInfo(@"F:\网站项目\Net项目试用\服务端双缓冲队列\需要启动的进程\bin\Debug\需要启动的进程.exe");
            process.StartInfo.WorkingDirectory = @"F:\网站项目\Net项目试用\服务端双缓冲队列\需要启动的进程\bin\Debug\";
            process.Start();

        }

        private void button_Click_2(object sender, RoutedEventArgs e)
        {
 
            System.Diagnostics.Process.Start(@"F:\网站项目\Net项目试用\服务端双缓冲队列\需要启动的进程\bin\Debug\需要启动的进程.exe");

        }
    }
}
